import { findCinemas } from '@/api/MaiZuo';

const clearCinemaList = () => {
  return { type: 'clear-cinemaList' };
};

const getCinemaList = (cityId = 110100) => {
  return (dispatch) => {
    findCinemas(cityId).then((res) => {
      dispatch({
        type: 'change-cinemaList',
        payload: res.cinemas || [],
      });
    });
  };
};

export { clearCinemaList, getCinemaList };
